約 3,964,409 件
https://w.atwiki.jp/sevenlives/pages/2590.html
FXML? シーングラフ? AWT Swing Java
https://w.atwiki.jp/kogo/pages/14.html
背景色のフェードアウト html head script type="text/javascript" cnt = 0; function fadeBgColor(targetID) { pat = fedcba9876543210 pat = 0123456789abcdef itv = 100; c = pat.charAt(cnt++); document.getElementById(targetID).style.backgroundColor ="#"+c+c+c+c+c+c if(cnt pat.length) setTimeout("fadeBgColor( " + targetID+ " )",itv); if(cnt == pat.length)cnt = 0; } /script /head body id="all" onLoad="fadeBgColor( all )" div h1 fade out /h1 /div /body /html
https://w.atwiki.jp/keroro00innovator/pages/2065.html
SHaVaDaVa in AMAZING SHaVaDaVa in AMAZING アーティスト ユイレヴィ 発売日 2014年11月19日 レーベル avex デイリー最高順位 13位(2014年11月19日) 週間最高順位 14位(2014年11月25日) 月間最高順位 39位(2014年11月) 年間最高順位 294位(2014年) 初動売上 2860 累計売上 6026 収録内容 曲名 タイアップ 視聴 1 SHaVaDaVa in AMAZING トリニティセブン ED ランキング 週 月日 順位 変動 週/月間枚数 累計枚数 1 11/25 14 新 2860 2860 2 12/2 28 ↓ 1183 4043 2014年11月 39 新 4043 4043 3 12/9 ↓ 544 4587 4 12/16 428 5015 5 12/23 420 5435 6 12/30 351 5786 7 15/1/6 240 6026 2014年12月 ↓ 1983 6026 トリニティセブン ED 前作 次作 BEAUTIFUL≒SENTENCEメイガス・トゥー SHaVaDaVa in AMAZING TRINITY×SEVENTH-HEAVENSecurity Politti 関連CD Seven Doors
https://w.atwiki.jp/ce00582/pages/3580.html
import java.awt.*; import java.awt.event.*; import java.awt.image.*; class game0404 extends Frame{ PixelGrabber pg; Color col; Image img; int w=665; int h=886; int pix[]=new int[w*h]; int red,green,blue; int memor[][]=new int[h][w]; int memog[][]=new int[h][w]; int memob[][]=new int[h][w]; int m,n; int num; String s1,s2; game0404() { s1="600.jpg"; s2="700.jpg"; catchimg(s2); } public static void main(String[] args) { game0404 f = new game0404(); f.setSize(700,900); f.setBackground(Color.blue) ; f.setVisible(true); f.addWindowListener(new WindowAdapter(){public void windowClosing(WindowEvent e){System.exit(0);}}); } public void paint( Graphics g ) { int i,mx,nx,z,pp; g.setColor(Color.blue); g.fillRect(0,0,600,600); mx=1; nx=1; for (mx=0;mx h;mx++){ for (nx=0;nx w;nx++){ g.setColor(new Color(memor[mx][nx],memog[mx][nx],memob[mx][nx])); g.fillRect(nx,mx,1,1); } } } void catchimg(String s){ img = createImage(w,h); img = Toolkit.getDefaultToolkit().getImage(s); pg = new PixelGrabber(img,0,0,w,h,pix,0,w); try{pg.grabPixels();}catch(InterruptedException ie){} m=0; n=0; for(int i=0;i w*h;i++){ int p = pix[i]; col=new Color(pix[i]); red=col.getRed(); green=col.getGreen(); blue=col.getBlue(); memor[m][n]=red; memog[m][n]=green; memob[m][n]=blue; n=n+1; if (n==w)m=m+1; if (n==w)n=0; } } }
https://w.atwiki.jp/cappu/pages/70.html
参考 http //kenai.com/projects/jruby/pages/RedBridge require と クラスパス JRubyの require の検索は Javaのクラスパスを用いる require erb とある場合は、Javaのクラスパスのデフォルトパッケージ内に、erb.rb が含まれていれば良い。 require com/xxx/mylib とある場合は、Javaのクラスパスのcom.xxxパッケージ内に、mylib.rb が含まれていれば良い。 サンプル public static void main(String[] args) throws FileNotFoundException { scriptHelloWorld(); scriptHelloWorld2(); scriptHelloWorldFromFile(); } private static void scriptHelloWorld() { ScriptingContainer container = new ScriptingContainer(); container.runScriptlet("puts \"Hello World!\""); } private static void scriptHelloWorld2() { ScriptingContainer container = new ScriptingContainer(LocalContextScope.SINGLETHREAD, LocalVariableBehavior.PERSISTENT); container.runScriptlet("word = hello JRuby! "); container.runScriptlet("puts word"); } private static void scriptHelloWorldFromFile() throws FileNotFoundException { ScriptingContainer container = new ScriptingContainer(); container.runScriptlet(new FileInputStream(new File("helloworld.rb")), ""); } #配列 array = Array.new #ハッシュ hash = Hash.new hash[ a ] = A # A が表示される puts hash[ a ]
https://w.atwiki.jp/ce00582/pages/1957.html
class tax{ public static void main(String args[]){ double th[]= new double[201]; double c[]= new double[201]; double y[]= new double[201]; int opc[]= new int[201]; int opy[]= new int[201]; int opq[]= new int[201]; double u[][][]=new double[201][3][3]; double w[][][]=new double[200][3][3]; double v[][][][]=new double[200][3][3][21]; int gotoc[][][][]=new int[200][3][3][21]; int gotoy[][][][]=new int[200][3][3][21]; int gotoq[][][][]=new int[200][3][3][21]; double endv[][]=new double[3][3]; int endc[][]=new int[3][3]; int endy[][]=new int[3][3]; int endq[][]=new int[3][3]; int s; double ls; double cs; double ys; double b1; double b2; double wel; double maxwel; int t; int n; int n1; int n2; int pp; int q; int j; double c1; double l1; double h; double u1; int ns1; int ns2; int qx; int nx1; int nx2; double vs; double v1; double maxv; double dc; double dy; int e; double data1[]=new double[101]; double data2[]=new double[201]; data1=ex1(); data2=ex2(); for (s=1;s 201;s++){ c[s]=data2[s]; y[s]=data2[s+200]; } for (s=1;s 201;s++){ th[s]=data1[s]; } h=0.001; t=0; while(t 1000){ for (s=1;s 201;s++){ for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ c1=c[s]+n1*h; l1=(y[s]+n2*h)/th[s]; u1=ux(c1,l1); u[s][n1+1][n2+1]=u1; } } } for (s=1;s 200;s++){ for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ c1=c[s]+n1*h; l1=(y[s]+n2*h)/th[s+1]; u1=ux(c1,l1); w[s][n1+1][n2+1]=u1; } } } for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ for (q=-10;q 11;q++){ v[1][n1+1][n2+1][q+10]=-999; } } } for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ q=n2-n1; v[1][n1+1][n2+1][q+10]=u[1][n1+1][n2+1]; } } for (s=2;s 200;s++){ for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ for (q=-10;q 11;q++){ u1=u[s][n1+1][n2+1]; qx=q-n1+n2; pp=0; if (qx 10)pp=100; if (qx -10)pp=100; if (pp 50)qx=0; vs=-999; ns1=0; ns2=0; for (nx1=-1;nx1 2;nx1++){ for (nx2=-1;nx2 2;nx2++){ v1=u1+v[s-1][nx1+1][nx2+1][qx+10]; if (w[s-1][nx1+1][nx2+1] u1)v1=-999; if (v1 vs)ns1=nx1; if (v1 vs)ns2=nx2; if (v1 vs)vs=v1; } } if (pp 50)vs=-999; gotoc[s][n1+1][n2+1][q+10]=ns1; gotoy[s][n1+1][n2+1][q+10]=ns2; gotoq[s][n1+1][n2+1][q+10]=qx; v[s][n1+1][n2+1][q+10]=vs; } } } } for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ u1=u[200][n1+1][n2+1]; qx=n2-n1; vs=-999; ns1=0; ns2=0; for (nx1=-1;nx1 2;nx1++){ for (nx2=-1;nx2 2;nx2++){ v1=u1+v[199][nx1+1][nx2+1][qx+10]; if (w[199][nx1+1][nx2+1] u1)v1=-999; if (v1 vs)ns1=nx1; if (v1 vs)ns2=nx2; if (v1 vs)vs=v1; } } endc[n1+1][n2+1]=ns1; endy[n1+1][n2+1]=ns2; endq[n1+1][n2+1]=qx; endv[n1+1][n2+1]=vs; } } maxv=-999; ns1=0; ns2=0; for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ if (endv[n1+1][n2+1] maxv)ns1=n1; if (endv[n1+1][n2+1] maxv)ns2=n2; if (endv[n1+1][n2+1] maxv)maxv=endv[n1+1][n2+1]; } } opc[200]=ns1; opy[200]=ns2; opc[199]=endc[opc[200]+1][opy[200]+1]; opy[199]=endy[opc[200]+1][opy[200]+1]; opq[199]=endq[opc[200]+1][opy[200]+1]; for (j=1;j 199;j++){ s=199-j; opc[s]=gotoc[s+1][opc[s+1]+1][opy[s+1]+1][opq[s+1]+10]; opy[s]=gotoy[s+1][opc[s+1]+1][opy[s+1]+1][opq[s+1]+10]; opq[s]=gotoq[s+1][opc[s+1]+1][opy[s+1]+1][opq[s+1]+10]; } e=0; for (s=1;s 201;s++){ e=e+opc[s]*opc[s]+opy[s]*opy[s]; } for (s=1;s 201;s++){ c[s]=c[s]+opc[s]*h; y[s]=y[s]+opy[s]*h; } System.out.println(e); if (e 2)h=h/2; if (h 0.00001)t=10000; t=t+1; } for (s=1;s 200;s++){ dy=y[s+1]-y[s]; dc=c[s+1]-c[s]; if (dy 0)System.out.println(1-dc/dy); } } static double[] ex2(){ double th[]= new double[201]; int s; double tl; double tr; double ls; double w; double cs; double ys; double b1; double b2; double tr1; double tr2; double tr3; double wel; double maxwel; double maxtl; double maxtr; int t; int n; double h; double c[]= new double[201]; double y[]= new double[201]; double data1[]=new double[201]; double data[]=new double[401]; int n1; int n2; data1=ex1(); for (s=1;s 201;s++){ th[s]=data1[s]; } maxwel=-999; maxtr=0; maxtl=0; for (n=20;n 45;n++){ tl=0.01*n; tr1=0.01; tr2=0.02; tr=tr1; b1=bud(tl,tr1,th); t=0; while (t 100) { b2=bud(tl,tr2,th); tr3=tr2-b2*(tr2-tr1)/(b2-b1); tr1=tr2; tr2=tr3; b1=b2; if (b2*b2 0.00001)t=1000; t=t+1; } tr=tr2; wel=seekwel(tl,tr,th); if (wel maxwel)maxtl=tl; if (wel maxwel)maxtr=tr; if (wel maxwel)maxwel=wel; } tl=maxtl; tr=maxtr; for (s=1;s 201;s++){ w=(1-tl)*th[s]; ls=(w-tr)/(2*w); if (ls 0)ls=0; c[s]=w*ls+tr; y[s]=th[s]*ls; } for (s=1;s 201;s++){ data[s]=c[s]; data[s+200]=y[s]; } return data; } static double ux(double c1,double l1){ double u1; double c3; double l3; int pp; pp=0; c3=c1; l3=l1; if (c3 0)pp=100; if (l3 0)pp=100; if (l3 1)pp=100; if (pp 50)c3=0.5; if (pp 50)l3=0.5; u1=Math.log(c3)+Math.log(1-l3); if (pp 50)u1=-999; return u1; } static double bud(double tl,double tr,double th[]){ double bx; int s; double w1; double y1; double c1; double l1; bx=0; for (s=1;s 201;s++){ w1=(1-tl)*th[s]; l1=(w1-tr)/(2*w1); if (l1 0)l1=0; y1=th[s]*l1; c1=w1*l1+tr; bx=bx+y1-c1; } return bx; } static double seekwel(double tl,double tr,double th[]){ double sw; int s; double w1; double l1; double c1; sw=0; for (s=1;s 201;s++){ w1=(1-tl)*th[s]; l1=(w1-tr)/(2*w1); if (l1 0)l1=0; c1=w1*l1+tr; sw=sw+ux(c1,l1); } return sw; } static double[] ex1(){ double p; double mu; double sig; double yy; double th[]= new double[201]; int s; mu=0; sig=0.39; for (s=1;s 201;s++){ p=0.005*s-0.0025; yy=seeky(p,mu,sig); th[s]=Math.exp(yy); } return th; } static double f(double x,double mu,double sig){ double pi,x1,x2,x3,fx; pi = 3.1415; x1=-Math.pow(x - mu,2) / (2*Math.pow(sig,2)); x2=Math.exp(x1); x3=sig*Math.pow(2*pi,0.5); fx=x2/x3; return fx; } static double g(double y,double mu, double sig){ double gx,h,x; int n,t; gx=0; h=0.001; t=(int)(y/h); for (n=-2000;n t;n++){ x=n*h; gx=gx+f(x,mu,sig)*h; } return gx; } static double seeky(double p,double mu,double sig){ double g1,g2,y1,y2,y3; int t; y1=0.4; y2=-0.2; g1=g(y1,mu,sig); t=0; while(t 100){ g2=g(y2,mu,sig); y3=y2+(p-g2)*(y2-y1)/(g2-g1); y1=y2; y2=y3; g1=g2; if (Math.pow(p-g2,2) 0.0001)t=1000; t=t+1; } return y2; } }
https://w.atwiki.jp/sunbalcan/pages/21.html
JAVA全般
https://w.atwiki.jp/javadsge/pages/546.html
javafx 画像 ボタン memo
https://w.atwiki.jp/ce00582/pages/1146.html
class tax{ public static void main(String args[]){ double th[]= new double[101]; double c[]= new double[101]; double y[]= new double[101]; int opc[]= new int[101]; int opy[]= new int[101]; int opq[]= new int[101]; double u[][][]=new double[101][3][3]; double ww[][][]=new double[100][3][3]; double v[][][][]=new double[100][3][3][21]; int gotoc[][][][]=new int[100][3][3][21]; int gotoy[][][][]=new int[100][3][3][21]; int gotoq[][][][]=new int[100][3][3][21]; double endv[][]=new double[3][3]; int endc[][]=new int[3][3]; int endy[][]=new int[3][3]; int endq[][]=new int[3][3]; int s; double tl; double tr; double ls; double w; double cs; double ys; double b1; double b2; double tr1; double tr2; double tr3; double wel; double maxwel; double maxtl; double maxtr; int t; int n; int n1; int n2; int pp; int q; int j; double c1; double l1; double h; double u1; int ns1; int ns2; int qx; int nx1; int nx2; double vs; double v1; double maxv; double dc; double dy; int e; double data1[]=new double[101]; double data2[]=new double[201]; data1=ex1(); data2=ex2(); for (s=1;s 101;s++){ c[s]=data2[s]; y[s]=data2[s+100]; } for (s=1;s 101;s++){ th[s]=data1[s]; } h=0.001; t=0; while(t 1000){ for (s=1;s 101;s++){ for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ c1=c[s]+n1*h; l1=(y[s]+n2*h)/th[s]; u1=ux(c1,l1); u[s][n1+1][n2+1]=u1; } } } for (s=1;s 100;s++){ for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ c1=c[s]+n1*h; l1=(y[s]+n2*h)/th[s+1]; u1=ux(c1,l1); ww[s][n1+1][n2+1]=u1; } } } for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ for (q=-10;q 11;q++){ v[1][n1+1][n2+1][q+10]=-999; } } } for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ q=n2-n1; v[1][n1+1][n2+1][q+10]=u[1][n1+1][n2+1]; } } for (s=2;s 100;s++){ for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ for (q=-10;q 11;q++){ u1=u[s][n1+1][n2+1]; qx=q-n1+n2; pp=0; if (qx 10)pp=100; if (qx -10)pp=100; if (pp 50)qx=0; vs=-999; ns1=0; ns2=0; for (nx1=-1;nx1 2;nx1++){ for (nx2=-1;nx2 2;nx2++){ v1=u1+v[s-1][nx1+1][nx2+1][qx+10]; if (ww[s-1][nx1+1][nx2+1] u1)v1=-999; if (v1 vs)ns1=nx1; if (v1 vs)ns2=nx2; if (v1 vs)vs=v1; } } if (pp 50)vs=-999; gotoc[s][n1+1][n2+1][q+10]=ns1; gotoy[s][n1+1][n2+1][q+10]=ns2; gotoq[s][n1+1][n2+1][q+10]=qx; v[s][n1+1][n2+1][q+10]=vs; } } } } for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ u1=u[100][n1+1][n2+1]; qx=n2-n1; vs=-999; ns1=0; ns2=0; for (nx1=-1;nx1 2;nx1++){ for (nx2=-1;nx2 2;nx2++){ v1=u1+v[99][nx1+1][nx2+1][qx+10]; if (ww[99][nx1+1][nx2+1] u1){ v1=-999; } if (v1 vs){ ns1=nx1; } if (v1 vs){ ns2=nx2; } if (v1 vs){ vs=v1; } } } endc[n1+1][n2+1]=ns1; endy[n1+1][n2+1]=ns2; endq[n1+1][n2+1]=qx; endv[n1+1][n2+1]=vs; } } maxv=-999; ns1=0; ns2=0; for (n1=-1;n1 2;n1++){ for (n2=-1;n2 2;n2++){ if (endv[n1+1][n2+1] maxv){ ns1=n1; } if (endv[n1+1][n2+1] maxv){ ns2=n2; } if (endv[n1+1][n2+1] maxv){ maxv=endv[n1+1][n2+1]; } } } opc[100]=ns1; opy[100]=ns2; opc[99]=endc[opc[100]+1][opy[100]+1]; opy[99]=endy[opc[100]+1][opy[100]+1]; opq[99]=endq[opc[100]+1][opy[100]+1]; for (j=1;j 99;j++){ s=99-j; opc[s]=gotoc[s+1][opc[s+1]+1][opy[s+1]+1][opq[s+1]+10]; opy[s]=gotoy[s+1][opc[s+1]+1][opy[s+1]+1][opq[s+1]+10]; opq[s]=gotoq[s+1][opc[s+1]+1][opy[s+1]+1][opq[s+1]+10]; } e=0; for (s=1;s 101;s++){ e=e+opc[s]*opc[s]+opy[s]*opy[s]; } for (s=1;s 101;s++){ c[s]=c[s]+opc[s]*h; y[s]=y[s]+opy[s]*h; } System.out.println(e); if (e 2){ h=h/2; } if (h 0.00001){ t=10000; } t=t+1; } for (s=1;s 100;s++){ dy=y[s+1]-y[s]; dc=c[s+1]-c[s]; if (dy 0)System.out.println(1-dc/dy); } } static double[] ex2(){ double th[]= new double[101]; int s; double tl; double tr; double ls; double w; double cs; double ys; double b1; double b2; double tr1; double tr2; double tr3; double wel; double maxwel; double maxtl; double maxtr; int t; int n; double h; double c[]= new double[101]; double y[]= new double[101]; double data1[]=new double[101]; double data[]=new double[201]; int n1; int n2; data1=ex1(); for (s=1;s 101;s++){ th[s]=data1[s]; } maxwel=-999; maxtr=0; maxtl=0; for (n=20;n 45;n++){ tl=0.01*n; tr1=0.01; tr2=0.02; tr=tr1; b1=bud(tl,tr1,th); t=0; while (t 100) { b2=bud(tl,tr2,th); tr3=tr2-b2*(tr2-tr1)/(b2-b1); tr1=tr2; tr2=tr3; b1=b2; if (b2*b2 0.00001)t=1000; t=t+1; } tr=tr2; wel=seekwel(tl,tr,th); if (wel maxwel)maxtl=tl; if (wel maxwel)maxtr=tr; if (wel maxwel)maxwel=wel; } tl=maxtl; tr=maxtr; for (s=1;s 101;s++){ w=(1-tl)*th[s]; ls=(w-tr)/(2*w); if (ls 0)ls=0; c[s]=w*ls+tr; y[s]=th[s]*ls; } for (s=1;s 101;s++){ data[s]=c[s]; data[s+100]=y[s]; } return data; } static double ux(double c1,double l1){ double u1; double c3; double l3; int pp; pp=0; c3=c1; l3=l1; if (c3 0)pp=100; if (l3 0)pp=100; if (l3 1)pp=100; if (pp 50)c3=0.5; if (pp 50)l3=0.5; u1=Math.log(c3)+Math.log(1-l3); if (pp 50)u1=-999; return u1; } static double bud(double tl,double tr,double th[]){ double bx; int s; double w; double y1; double c1; double l1; bx=0; for (s=1;s 101;s++){ w=(1-tl)*th[s]; l1=(w-tr)/(2*w); if (l1 0)l1=0; y1=th[s]*l1; c1=w*l1+tr; bx=bx+y1-c1; } return bx; } static double seekwel(double tl,double tr,double th[]){ double sw; int s; double w; double l1; double c1; sw=0; for (s=1;s 101;s++){ w=(1-tl)*th[s]; l1=(w-tr)/(2*w); if (l1 0)l1=0; c1=w*l1+tr; sw=sw+ux(c1,l1); } return sw; } static double[] ex1(){ double p; double mu; double sig; double yy; double th[]= new double[101]; int s; mu=0; sig=0.39; for (s=1;s 101;s++){ p=0.01*s-0.005; yy=seeky(p,mu,sig); th[s]=Math.exp(yy); } return th; } static double f(double x,double mu,double sig){ double pi,x1,x2,x3,fx; pi = 3.1415; x1=-Math.pow(x - mu,2) / (2*Math.pow(sig,2)); x2=Math.exp(x1); x3=sig*Math.pow(2*pi,0.5); fx=x2/x3; return fx; } static double g(double y,double mu, double sig){ double gx,h,x; int n,t; gx=0; h=0.001; t=(int)(y/h); for (n=-2000;n t;n++){ x=n*h; gx=gx+f(x,mu,sig)*h; } return gx; } static double seeky(double p,double mu,double sig){ double g1,g2,y1,y2,y3; int t; y1=0.4; y2=-0.2; g1=g(y1,mu,sig); t=0; while(t 100){ g2=g(y2,mu,sig); y3=y2+(p-g2)*(y2-y1)/(g2-g1); y1=y2; y2=y3; g1=g2; if (Math.pow(p-g2,2) 0.0001)t=1000; t=t+1; } return y2; } }
https://w.atwiki.jp/ebi_xyz/pages/41.html
javascriptでcookieを読み書きする場合について cookieの操作はdocument.cookie変数に対して行う。 読み込む際は、「var str = document.cookie;」と行えばstrにcookieの中身が全て格納される。 cookieは"名前=値; 名前=値; 名前=値; ..."という形式で入っているので、文字列を分割して必要な値のみを使用する。 書き込む際は、「document.cookie = "cookie名=値; expires=賞味期限";」と行えば書き込まれる。 複数のcookieを書き込む際は、それぞれをdocument.cookieに対して格納する。 「document.cookie = "cookie名=値; cookie名=値; expires=賞味期限"というような記載はNG。 sample code html head meta http-equiv="content-type" content="text/html; charset=Shift_JIS" title JavaScriptCookie /title script language="javascript" !-- var ckary = new Array(); var delimiter = "%00"; function setck() { ckary[0] = document.forms[0].usr.value; ckary[1] = document.forms[0].eml.value; ckary[2] = document.forms[0].url.value; //alert ( ◎フォームの内容\n +ckary[0]+ +ckary[1]+ +ckary[2]); var saveDay = 365; var exp = createRimit(saveDay); var ckstr = escape(ckary[0]); var i = 1; while (ckary[i]){ ckstr += delimiter + escape(ckary[i]); i++; } //alert ( ◎ESCAPEされた文字列 +ckstr); document.cookie = "TEST=" + ckstr + "; expires=" + exp.toGMTString(); // TESTの他にTEST2も用意するなら以下のように記載。 //document.cookie = "TEST2=" + ckstr + "; expires=" + exp.toGMTString(); } function createRimit(pSd) { var exp = new Date(); exp.setTime(exp.getTime()+1000*60*60*24*pSd); return exp; } function getck() { //alert ( ◎cookie文字列全体\n +document.cookie); ckary= document.cookie.split("; "); var ckstr= ""; var cktarget= "TEST="; var cklen= cktarget.length; var i = 0; while (ckary[i]){ if (ckary[i].substr(0,cklen) == cktarget){ ckstr = ckary[i].substr(cklen, ckary[i].length); break; } i++; } //alert ( ◎抽出された文字列\n +ckary[i]); ckary = ckstr.split(delimiter); if (ckary[0]) document.forms[0].usr.value = unescape(ckary[0]); if (ckary[1]) document.forms[0].eml.value = unescape(ckary[1]); if (ckary[2]) document.forms[0].url.value = unescape(ckary[2]); } function reset() { document.forms[0].usr.value = ""; document.forms[0].eml.value = ""; document.forms[0].url.value = ""; } // -- /script /head body onload="getck()" bgcolor="#ffffff" form input value="test" name="usr" size="40" type="text" br input name="eml" size="40" type="text" br input name="url" size="40" type="text" br input value="記録" onclick="setck()" type="button" input value="呼び出し" onclick="getck()" type="button" input value="リセット" onclick="reset()" type="button" /form /body /html 2011-01-02